let mongoose = require('mongoose')

mongoose.connect('mongodb+srv://2782409032:2FvG4tegQ1w5KbKH@cluster0.s1xysrf.mongodb.net/peta_doptionDB')

let conn = mongoose.connection

conn.on('open',()=>{
    console.log('数据库连接成功');
})

conn.on('error',()=>{
    console.log('数据库连接失败');
})

module.exports = mongoose